package org.jeecg.modules.system.simple;

import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.exceptions.ClientException;
import org.jeecg.common.util.DySmsEnum;
import org.jeecg.common.util.DySmsHelper;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.StaticConfig;
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle;
import org.junit.jupiter.api.Test;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;

/**
 * @author zgn
 * @Description: 模板Junit
 * @date 2022/1/13 0013
 */
public class 消息Junit {
    @Test
    public void egMin() {//e.g.
        System.out.println();
    }

    @Test
    public void 阿里云短信_egMin() {//e.g.
        String mobile="15371257290";
        JSONObject obj = new JSONObject();
        obj.put("code", "1234");
        try {
            DySmsHelper.sendSms(mobile, obj, DySmsEnum.LOGIN_TEMPLATE_CODE);
        } catch (ClientException e) {
            e.printStackTrace();
        }
    }

    @Test
    public void egMax() {//e.g.
        //region 模拟数据
        System.out.println("--------------------Start--------------------");
        //endregion

        //region 数据处理
        System.out.println("--------------------Deal--------------------");
        //endregion

        //region 数据展示
        System.out.println("--------------------Done--------------------");
        //endregion
    }
}
